/*
 * @Date: 2023-03-10 10:45:38
 * @LastEditors: Zireael 1193875164@qq.com
 * @LastEditTime: 2023-03-11 08:53:11
 * @FilePath: \A19\backend\src\shared\protocols\Get\PtlGetUserTest.ts
 */
import { ObjectId } from "mongodb";
import { BaseRequest, BaseResponse, BaseConf } from "../base";
import { studentAnswer } from "../../types/Answer";

export interface ReqGetUserTest extends BaseRequest {
  testId?: ObjectId;
  examOrHomework:"exam" | "homework"
  // courseId:ObjectId
}

export interface ResGetUserTest extends BaseResponse {
  tests: {
    _id: ObjectId
    student: ObjectId
    test: ObjectId
    submitTime: Date
    answers: Array<studentAnswer>
    score:number
    studentInfo: {
      _id: ObjectId;
      name: string;
      password?: string;
      role: string;
      email: string;
      school: string;
      number: string;
      gender: number;
      portrait: string;
    }[];
  }[];
}

export const conf: BaseConf = {
  needLogin: true,
};
